import sys
import kqueue

if __name__ == '__main__':
    kq = kqueue.kqueue()
    e = kqueue.Event(sys.stdin.fileno(), kqueue.EVFILT_READ, kqueue.EV_ADD)
    num, eventlist = kqueue.kevent(kq, [e], 1, 1, None)
    print num, eventlist